using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class _Default : System.Web.UI.Page 
{
    protected void Page_Load(object sender, EventArgs e)
    {
        // TODO: If using PDFduo Full Version, put your License Code below.
        // Otherwise, if you are using PDFduo Trial, comment out the 
        // following line (Free version doesn't have LicenseCode method). 
        // DuoDimension.HtmlToPdf.SetLicenseCode("YOUR-LICENSE-CODE-HERE"); 

        DuoDimension.HtmlToPdf conv = new DuoDimension.HtmlToPdf();
        conv.BasePath = MapPath(@"~\");                     // put image to the website root
        conv.OpenHTML(@"
                <div align='right'>
                    <img src='logo.jpg' width='200' height='150'/>
                </div>");
        conv.ShowPDF(conv.SavePDF(), Response);             // show resulting PDF on the screen
        conv.SavePDF(MapPath(@"~\") + "test.pdf");          // or you can save file to server root
    }
}
